I filed feedback for either this or a similar issue FB15170769 - I reproduced the same Fatal Error but there's no save needed, it happens when a FetchedResultCollection is passed to a SwiftUI List()
Post
Replies
Boosts
Views
Activity
@jhokit thank you for this sample project, it was extremely helpful. I worked around SwiftData's Query memory issue using this workaround: https://gist.github.com/juanarzola/dca3c96f1122cb9710e443e40d75b01b
The problem is not just when counting, any query will load all the objects. It's a terrible regression, I don't know why it won't get fixed.
it's not perfect and just wrote it so it might not have the best naming. Thankfully "willSave" now works so we can write code like this.